﻿<UserControl x:Class="Timetable.AWP.Views.ScheduleEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d" 
             d:DesignHeight="700" d:DesignWidth="300">
    <ScrollViewer>
        <Grid ScrollViewer.VerticalScrollBarVisibility="Hidden">
            <Grid.RowDefinitions>
                <RowDefinition Height="24"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
            </Grid.RowDefinitions>

            <Label Content="Факультет"/>
            <telerik:RadComboBox Margin="3"
                                    ItemsSource="{Binding Faculties}" 
                                    SelectedItem="{Binding SelectedFaculty}" 
                                    DisplayMemberPath="Name" Grid.Row="1" />

            <Label Content="Курс" Grid.Row="2"/>
            <telerik:RadComboBox Margin="3"
                                    ItemsSource="{Binding Courses}" 
                                    SelectedItem="{Binding SelectedCourse}" 
                                    DisplayMemberPath="Name" Grid.Row="3"/>

            <Label Content="Группа" Grid.Row="4"/>
            <telerik:RadComboBox Margin="3" Grid.Row="5"
                                IsEnabled="{Binding IsEnabledGroups}"
                                ItemsSource="{Binding Groups}">
                <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                        <CheckBox ClickMode="Press" Content="{Binding Path=Object.Code}" IsChecked="{Binding Path=IsSelected, Mode=TwoWay}" />
                    </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
            </telerik:RadComboBox>
        

            <Label Content="Предмет" Grid.Row="6"/>
            <telerik:RadComboBox Margin="3" Grid.Row="7"
                                 IsEnabled="{Binding IsEnabledTutorials}"
                                 ItemsSource="{Binding Tutorials}" 
                                 SelectedItem="{Binding SelectedTutorial}"
                                 DisplayMemberPath="Name">
            </telerik:RadComboBox>

            <Label Content="Вид предмета" Grid.Row="8"/>
            <telerik:RadComboBox Margin="3" Grid.Row="9"
                                 IsEnabled="{Binding IsEnabledTutorialTypes}"
                                 ItemsSource="{Binding TutorialTypes}"
                                 SelectedItem="{Binding SelectedTutorialType}"
                                 DisplayMemberPath="Name">
            </telerik:RadComboBox>
            <Label Content="Перподаватель" Grid.Row="10"/>
            <telerik:RadComboBox Margin="3" Grid.Row="11"
                                 IsEnabled="{Binding IsEnabledLecturers}"
                                 ItemsSource="{Binding Lecturers}" 
                                 SelectedItem="{Binding SelectedLecturer}"
                                 DisplayMemberPath="Lastname">
            </telerik:RadComboBox>
        
            <Label Content="Дни недели" Grid.Row="12"/>
            <telerik:RadComboBox Margin="3" Grid.Row="13"
                                 ItemsSource="{Binding Days}"
                                 SelectedItem="{Binding SelectedDay}">
                <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                        <CheckBox ClickMode="Press" Content="{Binding Path=Object.Name}" IsChecked="{Binding Path=IsSelected, Mode=TwoWay}" />
                    </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
            </telerik:RadComboBox>

            <Label Content="Время" Grid.Row="14"/>
            <telerik:RadComboBox Margin="3" Grid.Row="15" 
                                 ItemsSource="{Binding Times}"
                                 SelectedItem="{Binding SelectedTime}">
                <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="75" />
                                <ColumnDefinition Width="75" />
                            </Grid.ColumnDefinitions>
                            <Label Content="{Binding Path=Start}" Grid.Column="0"/>
                            <Label Content="{Binding Path=End}" Grid.Column="1"/>
                        </Grid>
                    </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
            </telerik:RadComboBox>

            <Label Content="Аудитория" Grid.Row="16"/>
            <telerik:RadComboBox Margin="3" Grid.Row="17"/>

            <telerik:RadButton Content="Запланировать" Grid.Row="18" Margin="15,3"/>
        </Grid>
    </ScrollViewer>
</UserControl>
